package com.zhentao.datacontrol.controller;

import com.zhentao.subscription.common.R;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/api/datacontrol/test")
@CrossOrigin(origins = "*")
public class TestController {

    @GetMapping("/ping")
    public R<String> ping() {
        return R.ok("DataControl module is working!");
    }

    @GetMapping("/info")
    public R<Map<String, Object>> info() {
        Map<String, Object> info = new HashMap<>();
        info.put("module", "DataControl");
        info.put("status", "active");
        info.put("timestamp", System.currentTimeMillis());
        return R.ok(info);
    }
}
